/*
 * Created on Jun 22, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.novix.utility.web;

import org.apache.commons.lang.StringUtils;

/**
 * @author Dev
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class AttachmentLoader {

    /**
     * 
     */
    private AttachmentLoader() {
        super();
        // TODO Auto-generated constructor stub
    }
    /**
     * @return
     */
    public static boolean isValidFileName(String strLink) {
        String[] files;
        files = new String[] { ".gif", ".jpeg", ".jpg", ".jpe", ".jfif", ".pjpeg", ".pjp" };
        boolean isValidFile = false;
        for (int i = 0; i < files.length; i++) {
            if (StringUtils.contains(strLink.toLowerCase(), files[i])){
                isValidFile = true;
            	return isValidFile;
            }
        }
        return isValidFile;
    }

}
